<template>
	<div class="card m5 p10 flex_col">
		<div class="flex_row_center mt5">
			<label>版本</label>
			<label class="ml5">{{ props.firm.version }}</label>
		</div>
		<div class="flex_row_center mt5">
			<label>描述</label>
			<label class="ml5">{{ props.firm.description }}</label>
		</div>
		<div class="flex_row_center mt5">
			<label>更新时间</label>
			<label class="ml5">{{ dateFormat(props.firm.create_timestamp) }}</label>
		</div>
		<div class="flex_row_center mt5">
			<label>大小</label>
			<label class="ml5">{{ sizeFormat(props.firm.size) }}</label>
		</div>
		<div class="flex_row_center mt5">
			<el-button @click="cb(props.firm.id)" type="danger">删除</el-button>
		</div>
	</div>
</template>

<script lang="ts" setup>
import type { Firm } from '@/service/model';
import { dateFormat, sizeFormat } from '@/service/utils';


interface Props {
	firm: Firm
	cb: (id: number)=>void,
}

const props = defineProps<Props>();



</script>
